ggplot2()Everything checksummed before storage and then referred by checksum.
It’s impossible to change the contents of any file or directory without Git knowing. You can’t lose information in transit or get file corruption without Git being able to detect it.
A 40-character hexadecimal SHA-1 hash:
24b9da6552252987aa493b52f8696cd6d3b00373
A way of reducing digital information to a unique ID:
Git doesn’t care about filenames, extensions, etc. It’ the information that matters…
The important stuff is hidden in the .git folder.
Select which files you want to commit.
Add a commit message and click commit.
push)Add a commit message and click commit.
Files are updated/stored on GitHub
RStudio has limited functionality.
$ git help <verb>
$ git <verb> --help
$ man git-<verb>
For example, you can get the manpage help for the config command by running git help config
Similar to info in git tab in RStudio
git config shows you all the git configuration settings:
user.emailremote.origin.url (e.g. to connect to GitHub)Branches used to develop features isolated from each other.
Default: master branch. Use other branches for development/collaboration and merge them back upon completion.
$ git checkout -b devel # create new branch and switch to it
$ git checkout master #switch back to master
$ git merge devel #merge in changes from devel branch
But we won’t do much with branching in this course…
Check out the (free) book ProGIT
| Option | default | effect |
|---|---|---|
eval |
TRUE |
Evalute the code and include the results |
echo |
TRUE |
Display the code along with its results |
warning |
TRUE |
Display warnings |
error |
FALSE |
Display errors |
message |
TRUE |
Display messages |
tidy |
FALSE |
Reformat code to make it ‘tidy’ |
results |
“markup” | “markup”, “asis”,“hold”,“hide” |
cache |
FALSE |
Cache results for future renders |
comment |
"##" |
Comment character to preface results |
fig.width |
7 | Width in inches for plots |
fig.height |
7 | Height in inches for plots |
R Code Chunks: Displaying Plots
Use chunk options throughout a document:
Update the YAML header to keep the markdown file
From this:
title: "Untitled"
author: "Adam M. Wilson"
date: "September 21, 2015"
output: html_document
To this:
title: "Demo"
author: "Adam M. Wilson"
date: "September 21, 2015"
output:
html_document:
keep_md: true
And click knit HTML to generate the output
# and ##) and some example narrative.See Rmd file for full references and sources